<?php

/**
 * Created by JetBrains PhpStorm.
 * User: GMC
 * Date: 10/3/13
 * Time: 2:20 PM
 * To change this template use File | Settings | File Templates.
 */
class WidgetCategoryInterested extends CWidget {
    public $model;

    public function init() {
        $ip = TreTodayCommon::getUserIp();
        $this->model = UserInterested::model()->findAllByAttributes(array('user_ip' => $ip), array('order' => 'priority DESC'));
    }

    public function run() {
        return CWidget::render('widgetCategoryInterested', array('model' => $this->model));
    }
}